package com.neu.credit.creditscore.entity.books;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDateTime;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@TableName("book_listing")
@Schema(name = "BookListing", description = "图书借阅子记录表")
public class BookListing {

    //清单未结束
    public final static int STATUS_NO = 1;
    //已结算
    public final static int STATUS_HAS = 2;

    //未删除
    public final static int DELETED_NO = 0;
    //已删除
    public final static int DELETED_HAS = 1;

    @Schema(description = "借阅ID，自增主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "用户ID")
    private Integer userId;

    @Schema(description = "图书ID")
    private Integer bookId;

    @Schema(description = "清单状态 1-未结算， 2-已结算")
    private Integer listStatus;

    @Schema(description = "是否删除 0-未删除， 1-已删除")
    private Integer deleted;

    @Schema(description = "创建时间")
    private LocalDateTime createdAt;

    @Schema(description = "更新时间")
    private LocalDateTime updatedAt;
}